using UnityEngine;
using System.Collections;

public class GUIController : MonoBehaviour {

	public Texture2D voix;

	// Use this for initialization
	void Start () {
	}
	
	// Update is called once per frame
	void OnGUI () {

		Color oldCol = GUI.color;
		Color col = GUI.color;
		col.a = col.a * ((Mathf.Sin(2 * Time.time) + 1) * 0.4f + 0.2f);
		//Debug.Log("a: " + col.a);
		GUI.color = col;
		GUI.DrawTexture(new Rect(0, 0, Screen.width, Screen.height), voix);
		GUI.color = oldCol;
	}
}
